<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>主页添加信息</title>
 <link rel="stylesheet" href="../lib/layui/css/layui.css" media="all">
 <script src="../lib/layui/layui.js"></script>
</head>
<body>
	<div class="layui-layout layui-layout-admin">
	<div class="layui-header">
    <div class="layui-logo">红娘娘信息管理</div>
  </div>
	 <div class="layui-side layui-bg-black">
    <div class="layui-side-scroll">
      <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
      <ul class="layui-nav layui-nav-tree"  lay-filter="test">
        <li class="layui-nav-item layui-nav-itemed">
          <a class="" href="javascript:;">信息</a>
          <dl class="layui-nav-child">
            <dd><a href="javascript:;">查询信息</a></dd>
            <dd><a href="javascript:;">用户信息</a></dd>
          </dl>
        </li>
        <li class="layui-nav-item layui-nav-itemed">
          <a class="" href="javascript:;">公司信息</a>
          <dl class="layui-nav-child">
            <dd><a href="zhuyexinxi.html">公司信息</a></dd>
            <dd><a href="zhuyetianjia.html">添加信息</a></dd>
             <dd><a href="zhuyebianji.html">编辑公司信息</a></dd>
         </dl>
        </li>
        <li class="layui-nav-item layui-nav-itemed">
          <a class="" href="javascript:;">婚恋顾问</a>
          <dl class="layui-nav-child">
            <dd><a href="javascript:;">顾问信息</a></dd>
         </dl>
        </li>
      </ul>
    </div>
  </div>
  
	
	
  <div class="layui-body">
	    <form class="layui-form"> 
	  
	   <div class="layui-form-item">
	    <label class="layui-form-label">姓名</label>
	    <div class="layui-input-block">
	      <input type="text" name="Name" placeholder="请输入" autocomplete="off" class="layui-input">
	    </div>
	  </div>
	  
	  <div class="layui-form-item layui-form-text">
	    <label class="layui-form-label">请填写简介</label>
	    <div class="layui-input-block">
	     <input type="text" name="jianjie" placeholder="请输入介绍"autocomplete="off" class="layui-input">
	    </div>
	  </div>
	 
	  <div class="layui-form-item layui-form-text">
	    <label class="layui-form-label">请填写事件</label>
	    <div class="layui-input-block">
	     <input type="text" name="shijian" placeholder="请输入介绍"autocomplete="off" class="layui-input">
	   </div>
	  </div>
	  
	  <div class="layui-form-item">
	    <div class="layui-input-block">
	      <button class="layui-btn" lay-submit lay-filter="sub">立即提交</button>
	      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
	    </div>
	  </div>
	  
	</form>
<script src="../lib/layui/layui.js"></script>
  </div>
  
  <div class="layui-footer">
    <!-- 底部固定区域 -->
    © HongNiangNiang.com - 底部固定区域
  </div>
</div>
	<script src="../lib/layui/layui.js"></script>
	<script>
	//JavaScript代码区域

	layui.use([ 'form', 'table','layer' ], function() {
		var form = layui.form;
		var table = layui.table;
		var layer = layui.layer;
		var $ = layui.$;

		//submit提交事件
		form.on('submit(sub)', function(data) {
			console.log(data.field) //当前容器的全部表单字段，名值对形式：{name: value}

			$.ajax({
				url : "../insert",
				type : "get",
				data : data.field,
				success : function(qwe) {

					layer.msg(qwe.msg);

				},

			});

			//return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。
		});

	})
</script>
	
	
</body>
</html>